package com.mes.schedule.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.ForeignKey;
import org.hibernate.annotations.GenericGenerator;

import com.mes.basicdata.domain.Calendar;
import com.mes.common.domain.BasicModel;
/***
 * @author cswen
 * @Time 2017/3/15
 */

@Entity
@org.hibernate.annotations.Entity(dynamicInsert=false,dynamicUpdate=false)
@Table(name = "R_CALENDAR_QUOTE")
public class ScheduleCalendarQuote extends BasicModel{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@GenericGenerator(name="uuid", strategy="assigned")
	@Column(name="UUID")
	private String uuid;

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}
	
	@Column(name = "CAL_UID")
	protected String calUid;
	
	@ForeignKey(name="null")
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "CALENDAR",insertable=false,updatable=false)
	protected Calendar calendar;
	
	@ForeignKey(name="null")
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "BASECALENDAR",insertable=false,updatable=false)
	protected Calendar baseCalendar;
	
	@Column(name = "STARTDATE")
	protected Date startDate;
	
	@Column(name = "ENDDATE")
	protected Date endDate;
	
	@Column(name = "QUOTEBASECALUID")
	protected String quoteBaseCalUid;
	
	public String getCalUid() {
		return calUid;
	}
	public void setCalUid(String calUid) {
		this.calUid = calUid;
	}
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	public String getQuoteBaseCalUid() {
		return quoteBaseCalUid;
	}
	public void setQuoteBaseCalUid(String quoteBaseCalUid) {
		this.quoteBaseCalUid = quoteBaseCalUid;
	}
	public Calendar getCalendar() {
		return calendar;
	}
	public void setCalendar(Calendar calendar) {
		this.calendar = calendar;
	}
	public Calendar getBaseCalendar() {
		return baseCalendar;
	}
	public void setBaseCalendar(Calendar baseCalendar) {
		this.baseCalendar = baseCalendar;
	}
	


}
